# gtkmm_static
# Builds from https://github.com/puppylinux-woof-CE/petbuilds

. ../func
. ../build.conf

URL=http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.24
PKG=gtkmm_static
SRCV=gtkmm
VER=2.24.2
COMP=tar.xz
DESC="C++ bindings for Gtk+2"
DEPS=+mm-common
CAT=BuildingBlock
DESKTOP=gtkmm.desktop
BUILD=
CWD=$(pwd)
[ -z "$MWD" ] && MWD=$(dirname $CWD)	
[ -z "$BUILD" ] && BUILD=$DEF_BUILD
[ -f "$DESKTOP" ] || DESKTOP=not
[ -z "$DEPS" ] && DEPS=not	

ARCH=$(uname -m)
case $ARCH in
 *64) 	LIBDIR=$LIBCONF64 ;;
 arm*)	LIBDIR=$LIBCONFarm;;
 *) 	LIBDIR=$LIBCONF32 ;;
esac

build() {
	mv ${SRCV}-${VER} ${PKG}-${VER}
	cd ${PKG}-${VER}
	./configure --prefix=/usr \
				--localstatedir=/var \
				--sysconfdir=/etc \
				--libdir=/usr/${LIBDIR} \
				--enable-static \
				--disable-shared \
				--disable-documentation
	[ "$?" -eq 0 ] || exit
	make $MKFLG
	[ "$?" -eq 0 ] || exit
	make DESTDIR=$CWD/${PKG}-install install
	cd -
}
	
# main
retrieve ${SRCV}-${VER}.${COMP}
extract ${SRCV}-${VER}.${COMP}
build
package_std $PKG $VER $ARCH $DESKTOP "$DESC" $DEPS $CAT	
